package model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class SdkDynRelation extends Model {

	String nmXmlPath;
	String nmIndex;
	private SdkDynMapper mapping;
	public SdkDynRelation(){}
	
	public SdkDynRelation(String path, String index, SdkDynMapper mapping)
	{
		this.nmXmlPath = path;
		this.nmIndex = index;
		this.mapping = mapping;
	}
	
	
	@ManyToOne
	@JoinColumn(name="CDDYNMAPPER")
	public SdkDynMapper getMapping() {
		return mapping;
	}

	public void setMapping(SdkDynMapper mapping) {
		this.mapping = mapping;
	}

	@Id
	@GeneratedValue
	@Override
	@Column(name="CDDYNRELATION")
	public int getId() {
		// TODO Auto-generated method stub
		return super.getId();
	}

	@Override
	public void setId(int id) {
		// TODO Auto-generated method stub
		super.setId(id);
	}


	public String getNmXmlPath() {
		return nmXmlPath;
	}

	public void setNmXmlPath(String path) {
		this.nmXmlPath = path;
	}

	
	public String getNmIndex() {
		return nmIndex;
	}

	public void setNmIndex(String index) {
		this.nmIndex = index;
	}

	

}
